package cn.wdm.ymcc.feign;

import cn.wdm.ymcc.CourseDoc;
import cn.wdm.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = SearchFeignClientFallBackFactory.class)
public interface SearchFeignClient {
    @PostMapping("/savaCourse2Es")
    JSONResult savaCourse2Es(@RequestBody CourseDoc doc);

    @DeleteMapping("/deleteCourseInEs/{courseId}")
    JSONResult deleteCourseInEs(@PathVariable("courseId") Long courseId);
}
